//
//  FightingAnimLayer.h
//  DiceWar
//
//  Created by xiaofeng on 25/6/12.
//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#ifndef CLASSES_GAME_GAMEPLAY_HEXMAP_FightingAnimLayer_H_
#define CLASSES_GAME_GAMEPLAY_HEXMAP_FightingAnimLayer_H_

#include "cocos2d.h"

class FightingAnimLayer : public cocos2d::CCLayer
{
public:
    LAYER_NODE_FUNC(FightingAnimLayer);
    
    bool init();
    void startFightingAnim(int attackerNumDices, int attackerNumPoints, int defenderNumDices, int defenderNumPoints, cocos2d::CCObject* pTarget,cocos2d::SEL_CallFunc pOnAnimationFinished);
    void startFightingAnim(cocos2d::CCObject* pTarget,cocos2d::SEL_CallFunc pOnAnimationFinished);
    
    void showFightResult();
    void hideFightResult();
    
private:
    cocos2d::CCSprite* createBackgroundSprite();
    cocos2d::CCLabelTTF* createNumDicesLabel(const cocos2d::CCPoint& position);
    cocos2d::CCLabelTTF* createNumPointsLabel(const cocos2d::CCPoint& position);
    
private:
    cocos2d::CCSprite* m_pBackgroundSprite;
    cocos2d::CCLabelTTF* m_pAttackerNumDices;
    cocos2d::CCLabelTTF* m_pAttackerNumPoints;
    cocos2d::CCLabelTTF* m_pDefenderNumDices;
    cocos2d::CCLabelTTF* m_pDefenderNumPoints;
};

#endif //CLASSES_GAME_GAMEPLAY_HEXMAP_FightingAnimLayer_H_
